import request from '@/utils/request'

// 查询计费规则时段列表
export function listCollectTime(query) {
  return request({
    url: '/system/collectTime/list',
    method: 'get',
    params: query
  })
}

// 查询计费规则时段详细
export function getCollectTime(id) {
  return request({
    url: '/system/collectTime/' + id,
    method: 'get'
  })
}

// 新增计费规则时段
export function addCollectTime(data) {
  return request({
    url: '/system/collectTime',
    method: 'post',
    data: data
  })
}
// 费用测算
export function ceshiCollectTime(data) {
  return request({
    url: '/system/collectTime/ceshiCollectTime',
    method: 'post',
    data: data
  })
}

// 修改计费规则时段
export function updateCollectTime(data) {
  return request({
    url: '/system/collectTime',
    method: 'put',
    data: data
  })
}

// 删除计费规则时段
export function delCollectTime(id) {
  return request({
    url: '/system/collectTime/' + id,
    method: 'delete'
  })
}

// 导出计费规则时段
export function exportCollectTime(query) {
  return request({
    url: '/system/collectTime/export',
    method: 'get',
    params: query
  })
}
